package edu.whu.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import edu.whu.demo.domain.Message;
import com.baomidou.mybatisplus.extension.service.IService;
import edu.whu.demo.domain.MessageDTO;
import edu.whu.demo.exception.MessageException;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 
 * @since 2022-12-15
 */
public interface IMessageService extends IService<Message> {

    IPage<MessageDTO> getOuterMessage(String type,
                                 Long toUid,
                                 Integer pageNum,
                                 Integer pageSize);

    IPage<MessageDTO> getMessage(Map<String, Object> condition,
                                 Integer pageNum,
                                 Integer pageSize);

    void setRead(Map<String, Object> condition) throws MessageException;

    Message addMessage(Message message) throws MessageException;

    void deleteMessage(Message message) throws MessageException;

    void updateMessage(Message message) throws MessageException;


}
